package com.example.mypigcar.service;

import com.example.mypigcar.common.exception.InsufficientBalance;
import com.example.mypigcar.common.exception.RepeatRegisterException;
import com.example.mypigcar.pojo.po.User;
import com.example.mypigcar.pojo.dto.LoginDTO;
import com.example.mypigcar.pojo.dto.UserBalanceDTO;
import com.example.mypigcar.pojo.dto.UserLicenseDTO;

import java.util.List;

/**
 * @author zkw
 * @Description TODO
 * @createTime 2021年07月01日 10:02:00
 */
public interface UserService {
    User getUser(LoginDTO loginDTO);

    boolean updateUser(User user);

    UserBalanceDTO updateUserBalance(User user) throws InsufficientBalance;

    UserLicenseDTO saveUserLicense(UserLicenseDTO userLicenseDTO);

    List<User> listUsers();

    User getUserByName(String username);

    boolean save(User user) throws RepeatRegisterException;

    boolean insertUserLicenseImg(User user);

    boolean delete(Integer userId);

    boolean getUserByPhone(String phone);
}
